-
Notifications
You must be signed in to change notification settings - Fork 435
fix(logger): caplog working with parent Logger #6847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(logger): caplog working with parent Logger #6847
Conversation
e1d5d1e
to
a571fa2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6847 +/- ##
========================================
Coverage 96.21% 96.21%
========================================
Files 273 273
Lines 12691 12693 +2
Branches 946 947 +1
========================================
+ Hits 12211 12213 +2
Misses 375 375
Partials 105 105 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @amin-farjadi thanks for sending this PR! I'm thinking that probably make sense I move everything to use caplog and I'll probably do that in a separate PR.
btw, the CI is failing and I'm trying to figure out.
APPROVED.
644447d
to
3831250
Compare
3831250
to
8735b26
Compare
@leandrodamascena |
I will see why pytest is failing |
Don't worry, this is about GH runners going crazy with threads. I'll fix it. |
|
Hey @amin-farjadi this is a temporary error that I'll fix that when refactoring part of our CI. I'll merge this PR. |
149d7fa
into
aws-powertools:develop
hey @leandrodamascena how does the tagging work? this fix didn't get tagged in develop 🤔 |
Do you mean if we released to pypi or in the develop branch? It's here: https://github.com/aws-powertools/powertools-lambda-python/blob/develop/aws_lambda_powertools/logging/logger.py#L378 |
I want to see which version of powertools I should pin my project to that has this fix in. |
We will release a new version in the next week and then you can use it. For now it's only on the develop branch. |
Issue number: #6753
Summary
Caplog fixture was not capturing logs made by parent loggers (logger with no
child=True
arg).Changes
SupressFilter
is not applied to pytest'sLogCaptureHanlder
.User experience
Users can now use
caplog
fixture to test their parent logger's behaviourChecklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? No
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.